Directory and doc rules

knitr::opts_chunk$set(
  echo = FALSE,         # Display code chunks
  eval = TRUE,         # Evaluate code chunks
  warning = FALSE,     # Hide warnings
  message = FALSE,     # Hide messages
  fig.width = 20,       # Set plot width in inches
  fig.height = 15,      # Set plot height in inches
  fig.align = "center" )# Align plots to the center

Load data

p450

dumbbell - original data in alphabetical order

dumbbell - log transformed data in alphabetical order

dumbbell - log transformed data grouped by reporting area with indicators of mean value (triangles)

dumbbell - PAH group 8

##   Kruskal-Wallis rank sum test
## 
## data: x and group
## Kruskal-Wallis chi-squared = 30.4644, df = 8, p-value = 0
## 
## 
##                            Comparison of x by group                            
##                                  (Bonferroni)                                  
## Col Mean-|
## Row Mean |         10         11         12         13          6          7
## ---------+------------------------------------------------------------------
##       11 |  -1.949000
##          |     0.9233
##          |
##       12 |   2.580192   3.392567
##          |     0.1777    0.0125*
##          |
##       13 |  -3.481090  -1.464937  -4.069711
##          |    0.0090*     1.0000    0.0008*
##          |
##        6 |  -0.441923   0.770017  -2.515655   1.736194
##          |     1.0000     1.0000     0.2139     1.0000
##          |
##        7 |  -0.101305   1.500658  -2.515347   2.771326   0.336028
##          |     1.0000     1.0000     0.2140     0.1005     1.0000
##          |
##      8.1 |  -0.410541   0.494120  -2.262756   1.221145  -0.071786  -0.337834
##          |     1.0000     1.0000     0.4257     1.0000     1.0000     1.0000
##          |
##      8.2 |  -2.770580  -1.432479  -3.915137  -0.407957  -1.757716  -2.441850
##          |     0.1007     1.0000    0.0016*     1.0000     1.0000     0.2630
##          |
##        9 |  -0.392586   1.018006  -2.584874   2.137008   0.091831  -0.270661
##          |     1.0000     1.0000     0.1753     0.5868     1.0000     1.0000
## Col Mean-|
## Row Mean |        8.1        8.2
## ---------+----------------------
##      8.2 |  -1.348148
##          |     1.0000
##          |
##        9 |   0.148740   2.031964
##          |     1.0000     0.7588
## 
## alpha = 0.05
## Reject Ho if p <= alpha/2

box plot - site

boxplot - reporting area

boxplot - PAH group 8

fix plotting order - it’s backwards

boxplot significant comparison code - haven’t checked it

correlation plot

correlation table

##    analyte correlation p_value
## 1  avg_sod      -0.326   0.005
## 2       a7       0.229   0.050
## 3      a12       0.233   0.046
## 4      a14       0.233   0.046
## 5      a15       0.256   0.028
## 6      a17       0.233   0.046
## 7      a18       0.233   0.046
## 8      a19       0.229   0.050
## 9      a63       0.233   0.046
## 10     a74       0.261   0.025
## 11     a81       0.254   0.029
## 12    a120       0.259   0.026
## 13    a125      -0.282   0.015

linear regression - signficant analytes